<?php

if(isset($_GET['ext'])&&$_GET['ext']=='data'){
	$db=new db;
	$db->connect();
	$res=$db->get_connection();
	require("public/exts/grid/codebase/grid_connector.php");
	$gridConn = new GridConnector($res);
	$gridConn->dynamic_loading(100);
	
	

	
	$filter1 = new OptionsConnector($res);
	$filter1->render_table("blog","id","id(value),name(label)");
	$gridConn->set_options("category",$filter1);
	
	/*
	$filter2 = new OptionsConnector($res);
	$filter2->render_table("blog","id","id(value),name(label)");
	$gridConn->set_options("subcategory",$filter1);
	*/
	$gridConn->render_table("blog_post","id","name,description,category,upload_time,upload_user,status");
	
}else{

$data1['title']="Quản Lý Blog Post";
loadview('template/header_admin',$data1);
loadview('manage/admin/blog');
loadview('template/footer_admin');
}
exit();